package com.swyc.osschat.Common.Base;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

@Mapper
public interface BaseDao<T extends BaseRelationEntity> extends BaseMapper<T> {
    /**
     * 新增一条数据
     * @param bean
     * @return
     */
//    @InsertProvider(method = "add",type=BaseSqlProvider.class)
//    @Options(useGeneratedKeys=true)
//    int add(T bean);

    /**
     * 根据主键删除一条数据
     * @param bean
     * @return
     */
//    @DeleteProvider(method = "delete",type=BaseSqlProvider.class)
//    int delete(T bean);

    /**
     * 根据主键获取一条数据
     * @param bean
     * @return
     */
//    @SelectProvider(method = "get",type=BaseSqlProvider.class)
//    T get(T bean);

    /**
     * 修改一条数据
     * @param bean
     * @return
     */
//    @UpdateProvider(method = "update",type=BaseSqlProvider.class)
//    int update(T bean);
}
